import type {Response_Dto} from '@/Dto/Response/Api_Result'
import request from '@/utils/request'
export const Get_Duty=(obj:{page:number;limit:number;key:string;}):
Promise<Response_Dto>=>{
    return request({
        url:"api/org/get_duty",
        method:"get",
        params:obj
    })
}

export const Delete_Duty=(obj:{ids:string[]}):Promise<Response_Dto>=>{

    return request({
        url:'api/org/Delete_Duty',
        method:'post',
        data:obj
    })
}

export const Ban_Duty=(obj:{id:string}):Promise<Response_Dto>=>{
    return request({
        url:'api/org/Ban_Duty',
        method:'post',
        data:obj
    })
}

export const Add_Duty=(obj:{name:string;explain:string;lv:number}):Promise<Response_Dto>=>{
    return request({
        url:'api/org/Add_Duty',
        method:'post',
        data:obj
    })
}

export const Get_Duty_Detail=(obj:{id:string}):Promise<Response_Dto>=>{

    return request({
        url:'api/org/Get_Duty_Detail',
        method:'get',
        params:obj
    })
}

export const Update_Duty=(obj:{id:string;name:string;explain:string;lv:number}):Promise<Response_Dto>=>{
    return request({
        url:'api/org/Update_Duty',
        method:'post',
        data:obj
    })
}